	#ifndef ENTITY_H_
#define ENTITY_H_

#include "ComponentDER.h"
#include "CompositeAttribute.h"
#include <map>

class Entity: public ComponentDER {

private:
	std::vector<Attribute *> m_entityAttributes;
	std::vector<CompositeAttribute *> m_entityCompositeAttributes;
	std::map<Component *, Connector *> m_componentesYConectores;

	virtual void initializeConnectors();

public:

	Entity(const std::string & name = TARGET_ENTITY, int orientation = 0);

	Entity(const Entity &);
	Entity& operator=(const Entity&);

	virtual void serialize(XmlWriter & writer_rep, XmlWriter & writer_comp);

	virtual void update();

	virtual std::string description();

	std::vector<Attribute *> getEntityAttributes();
	std::vector<CompositeAttribute *> getEntityCompositeAttributes();
	Connector *getConnectorToAttribute(Component *c) {
		return m_componentesYConectores[c];
	}
};

#endif /* ENTITY_H_ */
